'''
Created on Sep 14, 2012

@author: johnny
'''
import unittest
import time
import vserver, storage


class Test(unittest.TestCase):


    def setUp(self):
        pass


    def tearDown(self):
        pass


    def testMount(self):
        #print storage.get_storage_path("192.168.200.6", "autoadd")
        server = vserver.VServer('192.168.200.6')
        nfs = {
               'serviceip': '192.168.1.40',
               'resource': '/mnt/test/nfs/chenximing'
               }
        
        server.add_storage("autoadd", 'NFS', nfs, is_mount=True)
        server.is_mounted("autoadd")
        
        time.sleep(20)
        server.del_storage("autoadd")


if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()